package com.cloud.log.autolevel.bean.properites;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author: ZhangKaiQiang
 * @date: 2021/1/8
 * @time: 10:56
 **/
@ConfigurationProperties(prefix = "auto.level.zk")
public class ZkConfigProperties {

    /**
     * 链接Url
     */
    private String connectionUrl;

    /**
     * session超时时间
     */
    private Integer sessionTimeOutMs;

    /**
     * 链接超时时间
     */
    private Integer connectionTimeoutMs;

    /**
     * 默认的zk路径
     */
    private String namespace;

    public String getConnectionUrl() {
        return connectionUrl;
    }

    public void setConnectionUrl(String connectionUrl) {
        this.connectionUrl = connectionUrl;
    }

    public Integer getSessionTimeOutMs() {
        return sessionTimeOutMs;
    }

    public void setSessionTimeOutMs(Integer sessionTimeOutMs) {
        this.sessionTimeOutMs = sessionTimeOutMs;
    }

    public Integer getConnectionTimeoutMs() {
        return connectionTimeoutMs;
    }

    public void setConnectionTimeoutMs(Integer connectionTimeoutMs) {
        this.connectionTimeoutMs = connectionTimeoutMs;
    }

    public String getNamespace() {
        return namespace;
    }

    public void setNamespace(String namespace) {
        this.namespace = namespace;
    }

    @Override
    public String toString() {
        return "ZkConfig{" +
                "connectionUrl='" + connectionUrl + '\'' +
                ", sessionTimeOutMs=" + sessionTimeOutMs +
                ", connectionTimeoutMs=" + connectionTimeoutMs +
                ", namespace='" + namespace + '\'' +
                '}';
    }
}
